// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.sys.entity.*;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * MaterialPurchaseOrder
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "purchase_order", autoResultMap = true)
@Schema(title = "原材料采购订单")
public class MaterialPurchaseOrder implements Serializable {

  /**
   * 采购单号
   */
  @TableField(value = "`pur_num_sear`")
  @Schema(title = "采购单号")
  private String purNumSear;

  /**
   * 采购单号
   */
  @TableField(value = "`purchase_order_code`")
  @Schema(title = "采购单号")
  private String purchaseOrderCode;

  /**
   * 供应商
   */
  @TableField(value = "`supplier_id`")
  @JoinField(Supplier.class)
  @Schema(title = "供应商")
  private Long supplierId;

  /**
   * 仓库
   */
  @TableField(value = "`wid`")
  @JoinField(Warehouse.class)
  @Schema(title = "仓库")
  private Long wid;

  /**
   * 联系人
   */
  @TableField(value = "`contact_person`")
  @Schema(title = "联系人")
  private String contactPerson;

  /**
   * 联系电话
   */
  @TableField(value = "`contact_number`")
  @Schema(title = "联系电话")
  private String contactNumber;

  /**
   * 结算方式
   */
  @TableField(value = "`settlement_method`")
  @Schema(title = "结算方式")
  private String settlementMethod;

  /**
   * 预付比例
   */
  @TableField(value = "`advance_ratio`")
  @Schema(title = "预付比例")
  private java.math.BigDecimal advanceRatio;

  /**
   * 结算描述
   */
  @TableField(value = "`settlement_describe`")
  @Schema(title = "结算描述")
  private String settlementDescribe;

  /**
   * 支付方式
   */
  @TableField(value = "`payment_method`")
  @Schema(title = "支付方式")
  private String paymentMethod;

  /**
   * 采购币种
   */
  @TableField(value = "`purchase_currency`")
  @Schema(title = "采购币种")
  private String purchaseCurrency;

  /**
   * 运费
   */
  @TableField(value = "`shipping_price`")
  @Schema(title = "运费")
  private java.math.BigDecimal shippingPrice;

  /**
   * 其它费用
   */
  @TableField(value = "`other_currency`")
  @Schema(title = "其它费用")
  private java.math.BigDecimal otherCurrency;

  /**
   * 费用分摊方式 (0 - 不分摊; 1 - 按金额; 2 - 按数量; )
   */
  @TableField(value = "`fee_part_type`")
  @Schema(title = "费用分摊方式")
  private String feePartType;

  /**
   * 含税 (0 - 否; 1 - 是; )
   */
  @TableField(value = "`including_tax`")
  @Schema(title = "含税")
  private String includingTax;

  /**
   * 采购员
   */
  @TableField(value = "`opt_uid`")
  @JoinField(SysUser.class)
  @Schema(title = "采购员")
  private Long optUid;

  /**
   * 采购方
   */
  @TableField(value = "`purchaser`")
  @JoinField(Purchaser.class)
  @Schema(title = "采购方")
  private Long purchaser;

  /**
   * 产品类型 (0 - 原材料; 1 - 成品; )
   */
  @TableField(value = "`product_type`")
  @Schema(title = "产品类型")
  private String productType;

  /**
   * 单据负责人
   */
  @TableField(value = "`oversight_uid`", typeHandler = JacksonTypeHandler.class)
  @JoinField(SysUser.class)
  @Schema(title = "单据负责人")
  private List<Long> oversightUid;

  /**
   * 质检类型 (0 - 仓库质检; 1 - 预检; 2 - 免检; )
   */
  @TableField(value = "`inspection_type`")
  @Schema(title = "质检类型")
  private String inspectionType;

  /**
   * 采购日期
   */
  @TableField(value = "`purchases_date`")
  @Schema(title = "采购日期")
  private java.util.Date purchasesDate;

  /**
   * 备注
   */
  @TableField(value = "`remarks`")
  @Schema(title = "备注")
  private String remarks;

  /**
   * 总金额
   */
  @TableField(value = "`total_price`")
  @Schema(title = "总金额")
  private String totalPrice;

  /**
   * 采购数量
   */
  @TableField(value = "`purchase_quantity`")
  @Schema(title = "采购数量")
  private String purchaseQuantity;

  /**
   * 组织名称
   */
  @TableField(value = "`org_name`")
  @Schema(title = "组织名称")
  private String orgName;

  /**
   * 到货量
   */
  @TableField(value = "`quantity_received`")
  @Schema(title = "到货量")
  private Long quantityReceived;

  /**
   * SKU
   */
  @TableField(value = "`sku_sear`")
  @Schema(title = "SKU")
  private String skuSear;

  /**
   * SPU
   */
  @TableField(value = "`spu_sear`")
  @Schema(title = "SPU")
  private String spuSear;

  /**
   * 状态
   */
  @TableField(value = "`stauts`")
  @Schema(title = "状态")
  private String stauts;

  /**
   * 供应商名称
   */
  @TableField(value = "`supplier_name`")
  @Schema(title = "供应商名称")
  private String supplierName;

  /**
   * 仓库名
   */
  @TableField(value = "`warehouse_name`")
  @Schema(title = "仓库名")
  private String warehouseName;

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 申请人
   */
  @TableField(value = "`application`")
  @Schema(title = "申请人")
  private String application;

  /**
   * 申请部门
   */
  @TableField(value = "`application_dep`")
  @JoinField(SysDepartment.class)
  @Schema(title = "申请部门")
  private Long applicationDep;

  /**
   * 申请部门
   */
  @TableField(value = "`application_dep_name1`")
  @Schema(title = "申请部门")
  private String applicationDepName1;

  /**
   * 到货状态 (0 - 未到货; 1 - 部分到货; 2 - 全部到货; )
   */
  @TableField(value = "`arrival_status`")
  @Schema(title = "到货状态")
  private String arrivalStatus;

  /**
   * 业务标识
   */
  @TableField(value = "`business_ident`")
  @Schema(title = "业务标识")
  private String businessIdent;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 退款勾稽字段
   */
  @TableField(value = "`cross_checking`")
  @Schema(title = "退款勾稽字段")
  private Long crossChecking;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * FNSKU
   */
  @TableField(value = "`fnsku`")
  @Schema(title = "FNSKU")
  private String fnsku;

  /**
   * FNSKU
   */
  @TableField(value = "`fnsku_sear`")
  @Schema(title = "FNSKU")
  private String fnskuSear;

  /**
   * 审批状态 (-1 - 作废; 0 - 待提交; 1 - 待下单; 2 - 待到货; 9 - 已完成; 121 - 待审批(审批流); 122 - 驳回(审批流); 124 - 作废(审批流); )
   */
  @TableField(value = "`an_status`")
  @Schema(title = "审批状态")
  private String anStatus;

  /**
   * 款名
   */
  @TableField(value = "`km_sear`")
  @Schema(title = "款名")
  private String kmSear;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 下推贷款现结源表操作字段
   */
  @TableField(value = "`loan_now_balance_flag`")
  @Schema(title = "下推贷款现结源表操作字段")
  private String loanNowBalanceFlag;

  /**
   * 物流单号
   */
  @TableField(value = "`log_order_sear`")
  @Schema(title = "物流单号")
  private String logOrderSear;

  /**
   * 物流单号
   */
  @TableField(value = "`logistics_order`")
  @Schema(title = "物流单号")
  private String logisticsOrder;

  /**
   * 1688订单号
   */
  @TableField(value = "`num_order`")
  @Schema(title = "1688订单号")
  private String numOrder;

  /**
   * 1688订单号
   */
  @TableField(value = "`num_order_sear`")
  @Schema(title = "1688订单号")
  private String numOrderSear;

  /**
   * 单据备注
   */
  @TableField(value = "`order_remark_sear`")
  @Schema(title = "单据备注")
  private String orderRemarkSear;

  /**
   * 下单时间
   */
  @TableField(value = "`order_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "下单时间")
  private java.util.Date orderTime;

  /**
   * 单据备注
   */
  @TableField(value = "`oreder_remark`")
  @Schema(title = "单据备注")
  private String orederRemark;

  /**
   * 组织id
   */
  @TableField(value = "`org_id`")
  @JoinField(DbOrganization.class)
  @Schema(title = "组织id")
  private Long orgId;

  /**
   * 结算组织
   */
  @TableField(value = "`settlement_org`")
  @JoinField(DbOrganization.class)
  @Schema(title = "结算组织")
  private Long settlementOrg;

  /**
   * 采购组织
   */
  @TableField(value = "`purchases_org`")
  @JoinField(DbOrganization.class)
  @Schema(title = "采购组织")
  private Long purchasesOrg;
}
